#include <iostream>
#include <cmath>
using namespace std;


int raiz( double p, double n )
{
	return (int) round( pow( p, 1.0 / n ) );
}


int main()
{
	double p, n;

	while( cin >> n >> p, !cin.fail() )
	{
		cout << raiz( p, n ) << endl;
	}
}